﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Twipler.Data.Access;
using Twipler.Data.Entity.Theme;
using Twipler.Xtensions;

namespace TwiplerWeb.Settings.Theme
{
	public partial class EditHtml : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			string thing = Request.QueryStringString("thing", null);
			int? id = Request.QueryStringInt("id");

            if (thing == "block" && id.HasValue)
			{
				Block block = Factory.Block.GetById(id.Value, false);
				if (block == null)
					txtHtml.Text = "missing";
				else
					txtHtml.Text = block.Content;
			}
		}
	}
}
